<include file="Public/header" title="添加房源" />

<div id="page-wrapper">    
    <div class="row">
        <div class="col-md-6">
            <a href="{:U('house/add')}" class="btn btn-success">添加房源</a>
        </div>
        <div class="col-md-6">
            <!-- <form action="{:U('page/index')}" method="post">
                <div class="form-group input-group">
                    <input type="text" class="form-control" name="key" placeholder="输入单页标题或者别名关键词搜索">
                    <span class="input-group-btn">
                      <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                    </span>
                </div>
            </form> -->
        </div>
    </div>
    <table class="table table-hover table-striped">
        <thead>
            <tr>
                <th>编号</th>
                <th>项目名称</th>
                <th>楼牌信息</th>
                <th>面积</th>
                <th>居室</th>
                <th>房屋走向</th>
                <th>房屋类别</th>
                <th>原价</th>
                <th>立减</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <foreach name="model" item="v">
            <tr>
                <td>{$v["id"]}</td>
                <td>{$v["name"]}</td>
                <td>
                <if condition="$v['house_num'] neq null">
                {$v['house_num']}
                <else/>
                {$v["building"]}号楼{$v["unit"]}单元{$v["floor"]}0{$v["door"]}
                </if>
                </td>
                <td>{$v["square"]}㎡</td>
                <td>{$v["room"]}室{$v["living"]}厅{$v["toilet"]}卫</td>
                <td>{$v["face"]}</td>
                <td>{$v["size_intro"]}</td>
                <td>{$v["price"]}元</td>
                <td>{$v["reduce"]}元</td>
                <if condition="$v['flag'] eq 1"><td>已上架</td>
                <else/><td>已下架</td></if>
                <td>
                    <a class="edit" href="{:U('house/update',array('id'=>$v['id']))}">编辑</a>
                    <a class="del" href="{:U('house/delete',array('id'=>$v['id']))}">下架</a>
                </td>
            </tr>
            </foreach>
            <!-- <tr>
                <td>01</td>
                <td>大华锦绣华城</td>
                <td>5号楼1单元201</td>
                <td>10㎡</td>
                <td>3室3厅1卫</td>
                <td>南北走向</td>
                <td>精装</td>
                <td>12000元</td>
                <td>120万</td>
                <td>
                    <a class="edit" href="http://localhost/ThinkAdmin-master/admin.php?m=Admin&c=links&a=update">编辑</a>
                    <a class="del">删除</a>
                </td>
            </tr> -->
        </tbody>
    </table>
    {$page}
</div>
<include file="Public/footer" />